<?php
require dirname(__FILE__) . '/../../../auto_load.php';
class DtdDbTest extends PHPUnit_Framework_TestCase
{
	private $dtd_db;
	
	public function setUp()
	{
		$this->dtd_db = new DtdDb();
	}
	
	public function testDelete()
	{
		$result = $this->dtd_db->delete();
		var_dump($result);
	}
	
	public function testInsertRow()
	{
		$data = array(
			'value' => 'html5'
		);
		$result = $this->dtd_db->insertRow($data);
		var_dump($result);
	}
	
	public function testInsertRows()
	{
		$data = array(
			array(
				'value' => 'html5'
			),
			array(
				'value' => 'xhtml_1.0_transitional'
			)
		);
		$result = $this->dtd_db->insertRows($data);
		var_dump($result);
	}
	public function testSelectCount()
	{
		//$where = array('id'=>1);
		$result = $this->dtd_db->selectCount();
		var_dump($result);
	}
	
	public function testSelectRow()
	{
		$where = array('id'=>1);
		$result = $this->dtd_db->selectRow($where);
		var_dump($result);
	}
	
	public function testSelectRows()
	{
		$result = $this->dtd_db->selectRows();
		var_dump($result);
	}
	
	public function testUpdate()
	{
		$where = array('id'=>1);
		$data = array(
			'value' => 'asdf'
		);
		$result = $this->dtd_db->update($where,$data);
		var_dump($result);
	}
}
?>